import request from "../utils/request"//导入request实例对象
//将与服务端的交互代码放在api这一层
//条件查询班级
export const queryClazzApi = (name,begin,end,page,pageSize)=>request.get(`/clazzs?name=${name}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`)//箭头函数：若有返回值，可以简写将return和{}删掉

//新增班级
export const addClazzApi=(clazz)=>request.post('/clazzs',clazz)

//根据id查询班级
export const queryClazzByIdApi =(id)=>request.get(`/clazzs/${id}`)
//修改班级
export const updateClazzApi=(clazz)=>request.put('/clazzs',clazz)

//删除班级
export const deleteClazzApi=(id)=>request.delete(`/clazzs/${id}`)

//查询全部班级
export const queryAllClazzApi=()=>request.get('/clazzs/list')